{* Smarty *}
<!-- Add Section -->
<div class="box">
	<table cellspacing="0">
		<caption>{if isset($modify)}{t}caption modify section/node{/t}{else}{t}caption add node{/t}{/if}</caption>
		<tr>
			<th colspan="2">{if isset($modify)}{t}modify{/t}{else}{t}add node{/t}{/if}</th>
		</tr>
		<tr>
			{if isset($result)}
				{if isset($modify)}
			<td class="success"><a class="success" href="/sections">{t}node modified{/t}</a></td>
				{else}
			<td class="success"><a class="success" href="{$smarty.server.PHP_SELF}">{t}node added{/t}</a></td>
				{/if}
			{else}
			<td class="form">
				<form {$form_data.attributes}>
					<table class="form">
						<tr>
					 	  <td class="form">{$form_data.node.label}</td><td class="form">{$form_data.node.html}</td>
						</tr>
						<tr>
					 	  <td class="form">{$form_data.alias.label}</td><td class="form">{$form_data.alias.html}</td>
						</tr>
						<tr>
					 	  <td class="form">{$form_data.description.label}</td><td class="form">{$form_data.description.html}</td>
						</tr>
						<tr>
							<td colspan="2" class="right">{$form_data.btn_Submit.label}{$form_data.btn_Submit.html}</td>
						</tr>
						<tr>
						  <td colspan="2" class="center">{$form_data.requirednote}</td>
					  </tr>
					</table>
				</form>
			</td>
			{/if}
		</tr>
	</table>
</div>
<!-- List Sections -->

{if !isset($modify)}
<div class="box">
	<table cellspacing="0">
		<caption>{t}caption list sections{/t}</caption>
		<tr>
			<th width="90%" class="left">{t}sections{/t}/<small>{t}alias{/t}/<i>{t}description{/t}</i></small></th>
			<th width="10%" class="left">{t}options{/t}</th>
		</tr>
		{if isset($sections_path)}
		<tr>
			<th colspan="3" class="path_top"><small>> /{$sections_path}/</small></th>
		</tr>
		{/if}
		{if empty($sections)}
		<tr>
			<td>&nbsp;</td>
		</tr>
		{else}
		{foreach from=$sections item=node}
		<tr>
			{if $node.level == 0}
			<td width="60%" class="left" valign="top"><b>{$node.name|upper}</b>{if $node.alias}<br/>{$node.alias}{/if}{if $node.description}<br/><small><i>{$node.description|truncate}</i></small>{/if}</td>
			{else}
			<td width="60%" class="left" valign="top">{$node.name|indent:$node.level:"&nbsp;&nbsp;&nbsp;&nbsp;"}{if $node.alias}<br/>{$node.alias|indent:$node.level:"&nbsp;&nbsp;&nbsp;&nbsp;"}{/if}{if $node.description}<br/><small><i>{$node.description|indent:$node.level:"&nbsp;&nbsp;&nbsp;&nbsp;"}</i></small>{/if}</td>
			{/if}
			<td width="10%" valign="top">
				{html_image file="/smarty/templates_admin/$template/images/add-node.png" border="0" href="/sections/addnode/`$node.id`"}&nbsp;&nbsp;
				{html_image file="/smarty/templates_admin/$template/images/edit.gif" border="0" href="/sections/modify/`$node.id`"}&nbsp;&nbsp;
				{html_image file="/smarty/templates_admin/$template/images/delete.gif" border="0" href="/sections/delete/`$node.id`"}
			</td>
		 </tr>
		{/foreach}
		{/if}
		{if isset($sections_path)}
		<tr>
			<th colspan="3" class="path_bottom"><small>> /{$sections_path}/</small></th>
		</tr>
		{/if}
	</table>
</div>
{/if}